package com.bsoft.gol.hcs.enumcase;

import java.util.ArrayList;
import java.util.List;

/**
 * @author fzy91
 * @title: DiagnosisAndTreatmentDataType
 * @projectName GOL-ssdev4
 * @description: 诊疗数据类型枚举
 * @date 2022/5/3010:46
 */
public enum DiagnosisAndTreatmentDataTypeEnum {
    OUTPATIENT_RECORDS(1, 1,"门诊记录"),
    HOSPITALIZATION_RECORDS(2, 2,"住院记录"),
    PHYSICAL_EXAMINATION_RECORDS(3, 3,"体检记录"),
    INSPECTION_REPORT(4, 4,"检验报告"),
    CHECK_REPORT(5, 5,"检查报告"),
    PATHOLOGICAL_REPORT(6, 6,"病理报告"),
    ELECTRONIC_MEDICAL_RECORD(7, 7,"电子病历"),
    ORDER_RECORD(8, 8,"医嘱记录"),
    SURGICAL_RECORDS(9, 9,"手术记录"),
    TREATMENT_RECORDS(10,8,"治疗记录"),
    PRESCRIPTION_RECORDS(11,8,"用药记录"),
    INSPECTION_REQUISITION(12,8,"检验申请单"),
    INSPECTION_APPLICATION_FORM(13,8,"检查申请单");

    private final int type;

    private final int settingType;

    private final String text;

    DiagnosisAndTreatmentDataTypeEnum(int type, int settingType, String text) {
        this.type = type;
        this.settingType = settingType;
        this.text = text;
    }

    public static DiagnosisAndTreatmentDataTypeEnum getEnumByKey(int type) {
        for (DiagnosisAndTreatmentDataTypeEnum temp : DiagnosisAndTreatmentDataTypeEnum.values()) {
            if (temp.getType()==type) {
                return temp;
            }
        }
        return null;
    }

    public static List<DiagnosisAndTreatmentDataTypeEnum> getSettingTypeValue(int settingType) {
        List<DiagnosisAndTreatmentDataTypeEnum> list = new ArrayList<>();
        for (DiagnosisAndTreatmentDataTypeEnum temp : DiagnosisAndTreatmentDataTypeEnum.values()) {
            if (temp.getSettingType()==settingType) {
                list.add(temp);
            }
        }
        return list;
    }

    public int getType() {
        return type;
    }

    public String getText() {
        return text;
    }

    public int getSettingType() {
        return settingType;
    }
}
